//
//  QTFlowLayout.m
//  QTLifeCircle
//
//  Created by 徐腾 on 2017/1/15.
//  Copyright © 2017年 徐腾. All rights reserved.
//

#import "QTFlowLayout.h"

@implementation QTFlowLayout

- (void)prepareLayout {
    //调用父类的方法
    [super prepareLayout];
    
    //设置cell的属性
    //cell的宽度
    CGFloat width = [UIScreen mainScreen].bounds.size.width / 3;
    CGFloat height = ([UIScreen mainScreen].bounds.size.height-64-49) / 4;
    //设置cell的大小
    self.itemSize = CGSizeMake(width, height);
    //设置行间距和单元格间距
    self.minimumLineSpacing = 0;
    self.minimumInteritemSpacing = 0;
    
    //设置垂直滑动
    self.scrollDirection = UICollectionViewScrollDirectionVertical;
    
}


@end
